let mytoken = localStorage.getItem('token');
if (!mytoken) {
    location.href = './login.html'
}

// 点击退出按钮退出事件
$('.put').click(function (e) {
    e.preventDefault()
    layer.confirm('确认要退出吗?', { icon: 3, title: '提示' }, function (index) {
        localStorage.removeItem('token')
        layer.close(index)
        location.href = './login.html'
    });
})
